package itu.dk.bosk.ex8_4;


public class Man extends Person {

	SpeachBubble sb;
	
	public Man() {
		sb = new SpeachBubble();
	}

	public void sayHello(int times) throws AnotherCheckedException {
		
		if (times < 0) {
			// 0
			throw new IllegalArgumentException();
		}
		
		// 1: Another checked execption vil blive viderekastet.
		try {
			sb.write(times);
		}
		catch (MyCheckedException e) {
			// 3
			throw new AnotherCheckedException();
		}
		catch (IllegalArgumentException e) {
			// 2
			//Her konsumeres p� en eller anden m�de
		}
	}

}
